home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr23
/
csmac13a.zip
/
CS-MAC.CSM
< prev
next >
Wrap
Text File
|
1995-01-22
|
59KB
|
1,372 lines
┌────────────────────────────────┐
│ Chuck Seyboldt's COMMO Macro │ CS-MAC13A:CS-MAC.CSM
└────────────────────────────────┘ Copyright (c) 1995
* All rights reserved
*
* You will need to *> !EDIT! <* Only CS-COMMO.CSM
* ^^^^^^
* The file you are reading does *NOT* require editing.
*
*** You *must* edit your COMMO.FON to automate mail and file fetching.
* To do so automatically, Press Alt-M and choose "Add a new BBSID".
{:retu} {retu} ;very handy labelname
* Subroutine to clear rows from %count to 24}
{:1-2cle}{disp %count,1,, }
{incr count} {comp count,24} {ifco-le 1-2cle} {retu}
* Subroutines to show reassuring progress messages
{:assure} {disp %count,2,,Checking ...} {retu}
{:shh_assure} {disp %count,2,, ...} {retu}
┌─────────────────────────────────────────┐
│ Full screen threaded help file reader │
└─────────────────────────────────────────┘
{:keys} {setv var,keys} {retu}
{:tour} {setv var,CS-MAC} {retu}
{:va_rs}{setv var,variables} {retu}
{:set_var}
{setv valid,abcdefghijklmnopqrstuvwxyz1234567890_}
{setv ctr,0}
{:vvar_loop} {incr ctr} {subs t,%ctr,1,%pvar}
{comp t} {ifco va_var}
{inst valid,%t}
{setv var,%pvar}
{ifco vvar_loop,in_var}
{:in_var} {setv valid} {info-d5s0 "%pvar" is not a valid variable name} {retu}
{:va_var} {setv valid} {inpu %%var,Input value for %var} {retu}
{:pr_nt}{wind}
{setv var,%pvar}
{disp %_slp,24,70, Printing ... }
{wope %ramdr\!^(^)!}
{rclo} {rope %_hom%cs-mac.hlp,retu}
{:pr_rlo}{read hline}
{inst hline,e: %var } ;Short for "Variable"
{ifco ,pr_rlo}
{subs hline,12,72,%hline} ;truncate first line each subject
{:p_hlp}{writ %hline} {read hline}
{comp hline} {ifco ,p_hlp} ;if blank line, close and type
{writ }
{wclo}
{comp prn} {ifco-c _prn}
{exec-n type %ramdr\!^(^)! > %_prn}
{exec-n del %ramdr\!^(^)!>NUL}
{retu}
{:_prn} {setv _prn,prn} {retu}
{:press_cr}{setv stuft}{keys 0d}{retu}
{:_slp1}{setv _slp,25} {retu}
{:hl_prog}{disp %_slp,28,70, Searching ...} {retu}
{:csmh} {comp cs_hlp} {ifco csmhs}
{info-qs0 Do you want CS-MAC Help?}{ifco ,help}
{:csmhs}{setv var,?} {setv row,%_row} {setv col,%_col} {setv stuft,y}
{:csmhc}{stat n} {comp _slp} {ifco-c _slp1}
{comp xref} {ifco ,xref} ;returns to :csmhc w/variable
{disp %_slp,45,70, [P] print [S] set }
{comp hline} {ifco hl_p1}
{disp %_slp,15,70, [ENTER] next page }
{goto hl_px}
{:hl_p1}{disp %_slp,15,70, [?] help [K] keys}
{disp %_slp,16,70,%var }
{:hl_px}{disp %_slp,1,70, CS-MAC Help > }
{setv lvar,%var}
{sete-p0 hl_res}
{comp stuft,y} {ifco-c press_cr}
{gets-i var,12,hl_thd}
{comp var,%lvar} {ifco hl_res}
{comp var}{ifco hl_res} ;if ESCape from help window
{comp var,k} {ifco-c keys}
{comp var,t} {ifco-c tour}
{comp var,s} {ifco-c set_var}
{comp var,v} {ifco-c va_rs}
{comp var,p} {ifco-c pr_nt}
{:x_ref}{setv pvar,%var}
{rclo} {rope %_hom%cs-mac.hlp,no_vhlp}
{disp %_slp,16,70,%var }
{disp %_slp,28,70, ... }
{comp shh,y} {ifco-c ,hl_prog}
{:hl_rlo}{read hline}
{inst hline,e: %var } ;Short for "Variable"
{ifco ,hl_rlo} {setv var}
{:hl_p2}{subs hline,12,200,%hline} ;truncate first line each subject
{setv count,0}
{:m_hlp}{incr count}
{setv _menu%count,%hline}
{inst hline,Ref: }{ifco-c hl_ref} ;get next subject in thread
{comp print,y} {ifco-c print_l}
{read hline}
{comp count,20} {ifco-e hl_men} ;if at 20 lines, show menu
{comp hline} {ifco ,m_hlp} ;if blank line, show menu
{:hl_men}{wind} {incr count,4}{setv var}
{setv _mlabel,csmhc}
{subs _mcolor,1,5,%palette}
{wind-k}
{keys 61}
{menu %count,76,CS-MAC%ver Help}
{:hl_res}{wind} {rclo} {setv lvar} {setv hline} {setv pvar}
{stat y} {disp %row,%col} {setv col} {setv row} {retu}
{:hl_ref}{setv cn,%_pos}{incr cn,5}{subs xref,%cn,12,%hline}{setv cn}{retu}
{:hl_thd}{comp hline} {ifco ,hl_p2}
{comp lvar} {ifco hl_res} {setv var,%lvar} {goto x_ref}
{:xref} {inst xref, } {ifco ,xvar}
{setv pos,%_pos} {decr pos} {subs xref,1,%pos,%xref} {setv pos}
{:xvar} {setv var,%xref} {setv xref}
{goto csmhc} or to :x_ref for no-prompt
{:no_vhlp}
{disp %_slp,45,70, [ESC]ape to continue }
{disp %_slp,1,70, "%var" is not described in the CS-MAC.HLP file}
{alar 1} {paus 12} {setv var} {goto csmhc}
┌───────────────────┐
│ File-Edit-Menus │
└───────────────────┘
{:edit_menu}
{setv file,%reader} {call dr_of} {setv read,%file} ;:dr_of is in CS-COMMO
{setv file,%ev_file} {call dr_of} {setv evfi,%file}
{setv file,%address} {call dr_of} {setv adre,%file}
{setv _menu1, D %adre} {setv adre}
{setv _menu2, E %evfi} {setv evfi}
{setv _menu3, F File of choice}
{setv _menu4, M MACRO edit menu}
{setv _menu5, W Wishlist for d/l}
{setv _menu7,═════ Offline Messages ═════}
{setv _menu8, R RUN %read} {setv read}
{setv read} {setv evfi}
{setv _menter,do_ap}
{setv _mlabel,ed_a,,ed_c,ed_d,ed_e,ed_f,ed_g,ed_h,,,,ed_l,ed_m,,macro_menu,ed_p,ed_m,reader,ed_s,ed_t,,,ed_w,,,ed_z}
{subs _mcolor,19,5,%palette}
{menu 12,32, EDIT Menu }
{retu}
┌──────────────────────────────────┐
│ Macro and support file editing │
└──────────────────────────────────┘
{:ed_m}
{setv file,%ap_pass} {call dr_of} {setv pass,%file}
{setv _menu1, A cs-Acton.csm}
{setv _menu2, C cs-Commo.csm}
{setv _menu3, L cs-Logon.csm}
{setv _menu4, S cS-mac.csm}
{setv _menu5, T cs-Table.csm}
{setv _menu7, G cs-mac%ver.cfG}
{setv _menu8, H mostHost.mac}
{setv _menu9, P %pass (Host)} {setv pass}
{setv _menu10, Z %dev_mac}
{setv _menter,do_ap}
{setv _mlabel,ed_a,,ed_c,,,,ed_g,ed_h,,,,ed_l,macro_menu,,macro_menu,ed_p,edit_menu,,ed_s,ed_t,,,,,,ed_z}
{subs _mcolor,19,5,%palette}
{menu 14,25, MACRO Edit Menu }
{goto edit_menu} ;ESCape back to prior menu
{:def_ed}{setv lf_ed,%_hom} {retu} ;default edit file name
{:ed_a} {setv file,%_hom%cs-acton.csm} {goto ed_it}
{:ed_c} {setv file,%_hom%%_mac} {goto ed_it}
{:ed_d} {ifex-c %address,,make_add}
{setv file,%address} {comp exed_all,y}
{ifco ed_it} {edit %file} {goto do_ap}
{:ed_e} {setv file,%ev_file} {comp exed_all,y}
{ifco ed_it} {edit %file} {goto do_ap}
{:ed_f} {comp ed_wfl,y} {ifco ,ed_simple}
{call pm_p} ;routine in CS-COMMO using PNS
{rope %_hom%^(send^).lst,ed_it}
{setv file}
{:ed_floop} {read fname}
{setv file,%file %fname} {goto ed_floop}
{:ed_simple} {comp lf_ed} {ifco-c def_ed}
{setv file,%lf_ed}
{inpu file,File to Edit}
{setv lf_ed,%file} {goto ed_it}
{:ed_g} {setv file,%_hom%cs-mac%ver.cfg} {comp exed_all,y}
{ifco ed_it} {edit %file} {goto do_ap}
{:ed_h} {setv file,%_hom%Mosthost.mac} {goto ed_it}
{:ed_l} {setv file,%_hom%cs-logon.csm} {goto ed_it}
{:ed_p} {setv file,%ap_pass} {goto ed_it}
(:reader) is in CS-COMMO.MAC
{:ed_s} {setv file,%_hom%cs-mac.csm} {goto ed_it}
{:ed_t} {setv file,%_hom%cs-table.csm} {goto ed_it}
{:ed_w} {setv file,%dldir\wishlist} {comp exed_all,y}
{ifco ed_it} {edit %file} {goto do_ap}
{:ed_z} {setv file,%_hom%%dev_mac} {goto ed_it}
{:del_sendlst} {exec-n del %_hom%^(send^).lst>NUL}
{subs file,2,255,%file} {retu}
{:ed_it}{ifex %ext_ed,,in_ed}
{comp file,%_hom%%_mac} {ifco swap_ed}
{comp swap_ed,y} {ifco swap_ed}
{exec %ext_ed %file}
{comp ed_wfl,y} {ifco-c del_sendlst} {setv file} {retu}
{:swap_ed}{exec-s %ext_ed %file} {setv file} {retu}
{:in_ed}{inst file,*} {ifco in_mult}
{inst file,?} {ifco in_mult}
{inst file, } {ifco in_mult}
{edit %file} {retu}
{:in_mult} {info-d10s0 Commo's internal editor cannot handle multiple files}
{retu}
┌─────────────────────────┐
│ Built in voice dialer │
└─────────────────────────┘
{:dialer} ;Dial Phone for voice
{ifca retu} ;skip if OnLine
{ifex-c %address,,make_add} ;make address file
{setv file}
{sete-p0 do_ap}
{inpu file,Phone dialer ■ Search %address for: }
{comp file} {ifco retu}
{ifex %ext_di,enf6} ;if %ext_di exists, use
{setv srch_fil,%address}
{call search} {setv srch_fil}
{comp addr} {ifco retu}
{subs file,1,23,%addr} ;name in cols 1-23
{subs addr,32,14,%addr} ;phone# in cols 32-45
{wind-k}
{setv _menu1, Calling %file}
{setv _menu2, Dialing %addr}
{setv _mlabel,anf6}
{keys 61}
{menu 6,31,CS-MAC%ver}
{:anf6} {spdc n}
{sete-p0 no_talk}
{send ATM1DT%addr^m}
{setl 30}
{golo t_busy,BUSY}
{golo t_ring,RINGING}
{look %_tim}
{goto no_talk}
{:t_ring}
{info-d15 %file RINGING, Pick up the phone!}
{goto no_talk}
{:t_busy}
{info-d5s0 %file is BUSY }
{:no_talk}
{setv addr} {setv file}
{send } {wind} {paus 1}
{spdc y} {retu} ;end internal program
{:enf6} {exec-n %ext_di %file} {retu} ; -or- use external pgm
{:make_add}
{info-q1s0 Make %address now?}
{ifco ,stop}
{wope %address}
{writ CS-MAC%ver Address file Made on %_dat}
{writ Name Phone}
{writ ---------------------------- --------------}
{writ Chuck Seyboldt 1-414-250-0512 cboldt@nlbbs.com}
{writ Long Distance Information 1-800-555-1212}
{writ Ye Local Eat and Drinkery 555-1234 Pizza}
{wclo} {retu}
┌────────────────────────────────────────┐
│ REP and ACTION Mark and Dial Routine │
└────────────────────────────────────────┘
{:send_rep} {unma}
{setv ext,REP} {call repp_loop} ;check for REP packets
{setv ext,PST} {call repp_loop} ;check for PST packets
{goto act_mark} ;check for ACTION file
{:repp_loop} ;generic check for packet
{file %repdr\*.%ext}
{ifco rep_loop}
{comp sho_,y} {ifco ,retu}
{info-d3s0 No Reply Packets (.%ext)} ;say if no packet
{retu}
{:rep_loop}
{setv skip,y} ;or mark and check for more
{setv file,%_ffn}
{inst file,.} {setv pos,%_pos} {decr pos}
{subs file,1,%pos,%file}
{mark %file} ;%file == %bbsid
{comp sho_,y} {ifco ,retu}
{info-d3s0 Marking %file.%ext }
{file-x %repdr\*.%ext} ;any more REPs?
{ifco rep_loop} ;ifso, loop and mark them too
{retu}
{:act_mark}
{file %_hom%action.*} ;then check for ACTION files
{ifco act_loop} ;ifso, mark the dialer
{comp sho_,y} {ifco ,comp_skip}
{info-d3s0 No ACTION Requests} ;Say if no ACTION
{:comp_skip}
{comp skip} {ifco do_ap,dial_restrict};no REPs marked, do Autopilot
{:act_loop}
{subs file,-2,2,%_ffn} {mark %file^)} ;%file == %abbr
{info-d3s0 Marking ACTION.%file }
{file-x %_hom%action.*}
{ifco act_loop}
{:dial_restrict}
{setv m_call,fon_dial} ;set loop for dialer
{call rate} ;Check TelCo tarriff structure
{comp rate,day} {setv rate}
{ifco oride_msg,fon_dial} ;force manual dial if weekday
{:oride_msg}
{wind-k}
{info-d1s0 Autodial disabled during %rate ■ Override (y/N)?}
{setl 15,do_ap}
{golo fon_dial,y}
{golo do_ap,^m}
{golo do_ap,n}
{look Dial Phone now (y/N)?}
{goto do_ap}
┌─────────────────────────────────┐
│ Subroutine returns Telco rate │
└─────────────────────────────────┘
{:rate} {comp %_dwt,sat}{ifco nite};is it Saturday?
{comp %_24h,8} {ifco-l nite} ;is it before 8:00AM?
{comp %_24h,22} {ifco-g nite} ;is it after 10:59PM?
{comp %_24h,16} {ifco-g eve} ;is it after 4:59PM?
{comp %_dwt,sun}{ifco nite} ;Sunday 8AM-5PM == night rate
{setv rate,Day} {retu} ;else, full weekday rate applies
{:eve} {setv rate,Eve} {retu}
{:nite} {setv rate,Nite}{retu}
┌────────────────────────────────────────┐
│ Dialing Macro for BBS Mailrun Events │ Adapted From: TIM SAARI
└────────────────────────────────────────┘
{:fon_dial} dial-c 45, goto do_ap ;Optional simple Multi-dial & Return
{wind} {noca}
{setv busy,0}
{setv nodt,0}
{setv voic,0}
{setv carr,0}
{wind-k}
{:redial}
{setv flag} {setv ql} ;Clear anything set in .FON
{setv door2} {setv mail} ; else it carries over on BUSY
{setv abbr} {setv dorno}
{setv inet} {setv keyb}
{setv action}
{setv or_prot} {setv fe_pmt}
{setv alias} {setv qlo}
{setv count,12}
{sete-p0 do_ap} ;Goto autopilot on ESCape
{dial-c 1,,seeya} ;if RING interrupts dial
{comp _dtc,0} {ifco do_ap} ;no systems marked
{comp _dtc,3} {ifco inccarr} ;dialer timed out
{comp _dtc,4} {ifco interve} ;operator intervention
{comp _dialrt,BUSY} {ifco incbusy}
{comp _dialrt,NO DIAL TONE} {ifco incnodt}
{comp _dialrt,VOICE} {ifco incvoic}
{:incbusy}
{incr busy}
{comp busy,45} ;number of redials for a BUSY result code
{info-d5s0 BUSY ! %busy No Ans: %carr Voice: %voic No tone: %nodt}
{ifco-g ,redial}
{info-d5s0 Unmarking %_nam, BUSY}
{wope-a %_uselog} {writ}
{writ ^(Unm^) %_dat %_tim BUSY %_nam} {wclo}
{unma-l} {setv busy,0}
{wind} {goto redial}
{:inccarr}
{incr carr}
{comp carr,3} ;unmark after third NO ANSWER
{info-d5s0 NO ANS ! %carr Busy: %busy Voice: %voic No tone: %nodt}
{ifco-g ,redial}
{info-d5s0 Unmarking %_nam, NO ANSWER}
{wope-a %_uselog} {writ}
{writ ^(Unm^) %_dat %_tim NO ANSWER %_nam} {wclo}
{unma-l} {setv carr,0}
{wind} {goto redial}
{:incnodt}
{incr nodt}
{:d_nodt}{info-d10s0 NO DIAL TONE (%count%0 second delay) %nodt}
{decr count} {comp count,0} {ifco ,d_nodt}
{comp nodt,9} ;number of redials for a NO DIAL TONE result code
{ifco-g ,redial}
{wope-a %_uselog} {writ}
{writ %_dat %_tim NO DIAL TONE} {wclo}
{goto do_ap}
{:incvoic}
{incr voic}
{comp voic,5} ;number of redials for a VOICE result code
{info-d5s0 VOICE ! %voic Busy: %busy No tone: %nodt No Ans: %carr}
{ifco-g ,redial}
{info-d5s0 Unmarking %_nam, VOICE}
{wope-a %_uselog} {writ}
{writ ^(Unm^) %_dat %_tim VOICE %_nam} {wclo}
{unma-l} {setv voic,0}
{wind} {goto redial}
{:interve}
{info-d5s0 INTERRUPTED Busy: %busy Voice: %voic No tone: %nodt No Ans: %carr}
{info-qs0 Return to terminal?}
{wind}
{ifco do_ap}{wind-k}{goto redial}
┌────────────────────────┐
│ Dial Interrupt Macro │
└────────────────────────┘
{:seeya}{info-d600 Incoming call interrupted Dialout, pausing 10 minutes}
{retu}
┌─────────────────────────────────────────────────┐
│ Menu driven addition of new BBSs to COMMO.FON │
└─────────────────────────────────────────────────┘
{:new_bbsid}
{ifex-c %_hom%cs-mac.hlp,,need_hl}
{setv cs_col,70} ;set colors
{setv bbs_col,20} ;bbsware menu
{setv mwa_col,30} ;mailware menu
{setv ope_col,50} ;open door menu
{setv cfm_col,0f} ;confirm information
{setv temp}
{setv _menu1, 1 ■ Modify existing entry}
{setv _menu2, 2 ■ New entry to %_fon}
{setv _menter,esc}
{setv _mlabel,fon_a,fon_b}
{menu 6,33,.FON Configuration}
{goto esc}
{:fon_b}{setv count,8} {call 1-2cle}
{sete-p0 new_bbsid}
{disp 8,1,%cs_col, Making new entry into .FON directory }
{disp 9,2,,System name: } {gets-i sys_name,40,esc}
{disp ,,, Sysop name (optional): } {gets-i sys_op}
{disp 10,2,,%sys_name phone number: } {gets-i sys_num}
{setv sys_name,%sys_name ≡ %sys_op} {setv sys_op}
{comp sys_num} {ifco esc}
{disp 11,2,, Your password : } {gets-i pas}
{:g_bau}{disp 12,21,, }
{setv var,baud} {call disp_help}
{disp 12,2,,Baud rate (%_spe): } {gets-i baud,6}
{comp baud,1200} {ifco g_ter}
{comp baud,2400} {ifco g_ter}
{comp baud,4800} {ifco g_ter}
{comp baud,9600} {ifco g_ter}
{comp baud,19200} {ifco g_ter}
{comp baud,32400} {ifco g_ter}
{comp baud,57600} {ifco g_ter}
{comp baud,115000} {ifco g_ter}
{setv baud,%_spe}
{:g_ter}{disp 13,21,, }
{setv var,term} {call disp_help}
{disp 13,2,,Terminal [a,v,t] : } {gets-i term,1}
{comp term,a} {ifco g_ddd}
{comp term,v} {ifco g_ddd}
{comp term,t} {ifco g_ddd}
{goto g_ter}
{:g_ddd}{exec-s ver>nul}
{wope-a %_hom%%_fon}
{writ %sys_name 00/00/00 ^(%sys_num^) ^(%pas^) ^(^) ^(%baud,,,%term^)}
{wclo}
{exec-s ver>nul}
{setv sys_num} {setv pas}
{setv baud} {setv term}
{setv temp,%sys_name} {setv sys_name}
{:fon_a}{disp %count,1,, }
{setv count,9} {call 1-2cle}
{sete-p0 esc}
{inpu temp,Search %_fon for what BBS?}
{comp temp} {ifco esc}
{rope %_hom%%_fon,pick_1}
{setv count,1}
{clea}
{:id_loop}
{comp shh,y} {ifco-c shh_assure,assure}
{read line}
{inst line,%temp}
{ifco ,id_loop}
{inst line,^)} {ifco ,no_curley}
{subs line,1,%_pos,%line}
{:no_curley}
{disp %count,1,0e,%count. }
{disp %count,4,07,%line}
{incr count}
{goto id_loop}
{:only_1}{setv cntr,1}{goto jst_1}
{:pick_1}
{comp count,1} {ifco new_bbsid}
{comp count,2} {ifco only_1}
{disp %count,1,07, ^m^j^j}
{disp ,,,Which Number? } {setv cntr}
{gets-i cntr}
{comp cntr} {ifco new_bbsid}
{comp cntr,%count}
{ifco-ge pick_1}
{comp cntr,0} {ifco pick_1}
{:jst_1}{setv coun,1}
{rope %_hom%%_fon,clect_bbs}
{:next_b}
{read line}
{inst line,%temp}
{ifco ,next_b}
{comp cntr,%coun}
{ifco this_b}
{incr coun}
{goto next_b}
{:this_b}
{inst line,^)}
{subs line,1,%_pos,%line}
{clea}
{disp 10,1,,%line}
{setv hold,%line}
{rclo}
{:re_inid}
{disp 8,1,%cs_col, Add Mailrun variables to a .FON entry }
{setv bbsid}
{setv var,bbsid}
{call disp_help}
{disp 12,2,0e,Input BBSID for this Board: }
{gets-i bbsid,8}
{comp bbsid} {ifco esc}
{inst bbsid, } {ifco re_inid} ;Characters not allowed
{inst bbsid,.} {ifco re_inid} ; in DOS filenames
{inst bbsid,?} {ifco re_inid}
{inst bbsid,*} {ifco re_inid}
{setv var,bbs}
{call disp_help}
{disp 16,24,%bbs_col, EXEC-PC = exc │ PowerBBS = pow }
{disp 17,24,%bbs_col, GAP = gap │ Remote Ac = rma }
{disp 18,24,%bbs_col, Internet = int │ Spitfire = s-f }
{disp 19,24,%bbs_col, MacroBBS = mac │ T.A.G. = tag }
{disp 20,24,%bbs_col, MajorBBS = maj │ TriBBS = tri }
{disp 21,24,%bbs_col, MAXIMUS = max │ Virtual = vir }
{disp 22,24,%bbs_col, OPUS-CBCS = opu │ Wildcat! = wc! }
{disp 23,24,%bbs_col, PCBoard = pcb │ RBBS = pcb }
{:g_0} {setv bbs}
{disp 13,2,0e,Input BBS for "%bbsid" (Choose from BBSware list below): }
{gets-i bbs,3,esc}
{comp bbs,exc} {ifco g_e} EXEC-PC
{comp bbs,gap} {ifco g_1} GAP
{comp bbs,int} {ifco g_k} Internet
{comp bbs,mac} {ifco g_m} MacroBBS
{comp bbs,mah} {ifco g_1} MajorBBS Handle:
{comp bbs,maj} {ifco g_1} MajorBBS "new":
{comp bbs,max} {ifco g_1} MAXIMUS-CBCS
{comp bbs,opu} {ifco g_1} OPUS-CBCS
{comp bbs,pcb} {ifco g_1} PCBoard
{comp bbs,pow} {ifco g_p} PowerBBS
{comp bbs,rma} {ifco g_1} Remote Access
{comp bbs,s-f} {ifco g_1} Spitfire
{comp bbs,tag} {ifco g_1} T.A.G.
{comp bbs,tri} {ifco g_t} TriBBS
{comp bbs,vir} {ifco g_1} Virtual
{comp bbs,wc!} {ifco g_1} Wildcat!
{comp bbs,wc1} {ifco g_1} Wildcat!
{comp bbs,wc2} {ifco g_1} Wildcat!
{goto g_0}
{:g_k} {setv keyb}
{setv var,keyb}
{call disp_help}
{disp 14,2,0e,Load Keyboard macro after logon [PINE, VT102, VT220]: }
{gets-i keyb,8}
{comp keyb,pine} {ifco g_1}
{comp keyb,vt102}{ifco g_1}
{comp keyb,vt220}{ifco g_1}
{comp keyb} {ifco g_1}
{goto g_k}
{:g_e} {disp 14,67,0f,< exq} {goto g_1}
{:g_p} {disp 14,67,0f,< pwq} {goto g_1}
{:g_m} {disp 14,67,0f,< mmp} {goto g_1}
{:g_t} {disp 14,67,0f,< tma}
{:g_1} {setv var,mail}
{call disp_help}
{disp 16,8,%mwa_col, Bluewave = blu │ Jimmer = jmr │ O_QWKer = oqw │ Tomcat! = tc! }
{disp 17,8,%mwa_col, Cam-Mail = cam │ LAKOTA = lak │ PCBoard = p15 │ TriMail = tma }
{disp 18,8,%mwa_col, Char OLQ = coq │ MKQwk = mkq │ PowerBBS = pwq │ uqwk = uqw }
{disp 19,8,%mwa_col, DCQwk = dcq │ MarkMail = mm2 │ Qmail 2 = qm2 │ VBQwk = vbq }
{disp 20,8,%mwa_col, EXEC-PC = exq │ MajorBBS = mmj │ Qmail 4 = qm4 │ WC!Intl = wci }
{disp 21,8,%mwa_col, JCQwk = jcq │ MacroBBS = mmp │ RoseMail = roz │ WC!Mail = wcm }
{disp 22,8,%mwa_col, JetMail = jet │ Maximus = mxr │ Slvr Xpr = sxp │ ZIPnews = zns }
{disp 23,8,%mwa_col, │ │ │ }
{setv mail}
{disp 14,2,0e,Input MAIL for "%bbsid" (Choose from MAILware list below): }
{gets-i mail,3,nul_dorno}
{comp mail,blu} {ifco g_2} Bluewave
{comp mail,cam} {ifco g_2} CamMail
{comp mail,coq} {ifco g_2} Charlie's Off line Qwk
{comp mail,dcq} {ifco g_2} DCQwk
{comp mail,exq} {ifco g_2} EXEC-PC mail
{comp mail,jcq} {ifco g_2} JCQwk
{comp mail,jet} {ifco g_2} JetMail
{comp mail,jmr} {ifco g_2} Jimmer
{comp mail,lak} {ifco g_2} LAKOTA
{comp mail,mkq} {ifco g_2} MKQwk
{comp mail,mm2} {ifco g_2} Markmail
{comp mail,mmj} {ifco g_2} Major BBS
{comp mail,mmp} {ifco g_2} MacroBBS message packer
{comp mail,mxr} {ifco g_2} MAXIMUS Reader
{comp mail,oqw} {ifco g_2} O_QKWer mail door for OPUS
{comp mail,p15} {ifco g_2} PCBoard 15
{comp mail,pwq} {ifco g_2} PowerBBS built-in
{comp mail,qm2} {ifco g_2} Qmail 2
{comp mail,qm4} {ifco g_2} Qmail 4
{comp mail,roz} {ifco g_2} RoseMail
{comp mail,sxp} {ifco g_2} Silver Express
{comp mail,tc!} {ifco g_2} TomCat!
{comp mail,tma} {ifco g_2} TriMail
{comp mail,uqw} {ifco g_2} uqwk (unix program)
{comp mail,vbq} {ifco g_2} Virtual BBS QWK mail
{comp mail,wci} {ifco g_2} WildCat internal
{comp mail,wcm} {ifco g_2} WildCat mail (wcMAIL)
{comp mail,zns} {ifco g_2} Zipnews (not qwk based)
{goto g_1}
{:g_2} {comp mail,p15} {ifco nul_dorno}
{comp mail,uqw} {ifco nul_dorno}
{comp mail,wci} {ifco nul_dorno}
{setv var,dorno}
{call disp_help}
{disp 16,28,%ope_col, Some examples of DOOR }
{disp 17,28,%ope_col, commands to help you: }
{disp 18,28,%ope_col, }
{disp 19,28,%ope_col, open markmail^| }
{disp 20,28,%ope_col, }
{disp 21,28,%ope_col, s^|~~~~~~~~~~f^| }
{disp 22,28,%ope_col, }
{disp 23,28,%ope_col, /Q^| }
{setv dorno}
{disp 15,2,0e,Input BBS Command to enter the Maildoor: }
{gets-i dorno}
{:nul_dorno}
{subs abbr,1,2,%bbsid}
{setv ok}
{setv count,16} {call 1-2cle}
{disp 17,2,0e,Input YES to write to COMMO.FON: }
{gets-i ok,3,esc}
{comp ok} {ifco esc}
{inst ok,n} {ifco esc}
{comp ok,yes} {ifco ,nul_dorno}
*
* ┌────────────────────────────────────────────────────────────────┐
* │ Example of the data to be appended to an entry in COMMO.FON; │
* │ │
* │ (bbsid,escape) (abbr,es) (dorno,mmail|) (mail,mm2) (bbs,pcb) │
* └────────────────────────────────────────────────────────────────┘
{call no_hl}
{exec-s ver>nul} ;save .fon in current condition
{rope %_hom%%_fon,changed}
{wope %_hom%commofon.new}
{setv coun,1}
{:add_fon}
{setv count,19} ;set line to display on
{comp shh,y} {ifco-c shh_assure,assure} ;display "Working"
{read line}
{inst line,%temp}
{ifco ,add_line}
{comp cntr,%coun}
{incr coun}
{ifco append}
{:add_line}
{writ %line}
{goto add_fon}
{:append}
{disp 19,2,, }
{inst line,^(bbsid,}
{ifco ,1append}
{subs test,%_pos,255,%line}
{inst test,^)} {setv len,%_pos} {decr len,7}
{subs test,7,%len,%test}
{info-q0s0 BBSID = %test New BBSID = %bbsid ■ Change .FON entry anyway?}
{setv test} {setv len}
{ifco ,no_fonchg}
{:1append}
{inst line,^)} ;get position of first close curley
{ifco ,nop1_curl}
{subs p1,1,%_pos,%line} ;%p1 is from 1st open to close curley
{setv pos,%_pos} {incr pos}
{subs p2,%pos,255,%line} ;%p2 is all to right of close curley#1
{inst p2,^)} ;is there a close curley in %p2?
{ifco ,nop2_curl}
{setv pos,%_pos} {incr pos}
{subs p3,%pos,255,%p2} ;%p3 is all to right of close curley#2
{subs p2,1,%_pos,%p2} ;%p2 is from 2nd open to close curley
{inst p3,^)} ;is there a close curley in %p3?
{ifco ,nop3_curl}
{setv pos,%_pos} {incr pos}
{subs p4,%pos,255,%p3} ;%p4 is all to right of close curley#3
{subs p3,1,%_pos,%p3} ;%p3 is from 3rd open to close curley
{inst p3,^(} ;discard contents of curley pair #3
{subs p3,1,%_pos,%p3} ; keep column pos of 3rd open curley
{:p3_ok}{comp mail} ;is this a mailrun setup?
{ifco-c nul_mail,yes_mail} ;set 3rd curley pair with linked macro
{inst p4,^(} ;is there a 4th set of curleys?
{ifco-c ,nop4_curl} ; ifso, line is OK for adding variables
{:p4_ok}{setv line,%p1%%p2%%p3%%p4}
{comp mail} ;is this a mailrun setup?
{ifco-c bbs_writ,mail_wri} ;construct appropriate .FON entry
{comp keyb} {ifco-c ,yes_keyb}
{writ %line}
{incr coun}
{goto add_fon} ;read til end, goto :changed
{:nop1_curl} {disp 16,2,0e, }
{disp 16,2,0e,Phone number for "%bbsid%": }
{gets-i phone} {setv p1,%line ^(%phone^)} {setv phone}
{:nop2_curl} {disp 17,2,0e, }
{disp 17,2,0e,Password for "%bbsid%": }
{gets-i pas} {setv p2,^(%pas^)%p2} {setv pas}
{setv p3,^(} {goto p3_ok}
{:nop3_curl} {setv p3,^(} {goto p3_ok}
{:nop4_curl} {setv p4,^(^)} {retu}
{:nul_mail} {setv p3,%p3%glr^)} {retu} ;no mail defined
{:yes_mail} {setv p3,%p3%qwk^)} {retu} ;mail is defined
{:yes_keyb} {setv line,%line ^(keyb,%keyb^)} {retu}
{:bbs_writ} {setv line,%line ^(bbsid,%bbsid^) ^(abbr,%abbr^) ^(bbs,%bbs^)}
{setv chg_msg,%_hom%%_fon has been updated - logon only.^m^j ^(bbsid,%bbsid^) Linked macro = ^(glr^)}
{retu}
{:mail_wri} {setv line,%line ^(bbsid,%bbsid^) ^(abbr,%abbr^) ^(bbs,%bbs^) ^(mail,%mail^)}
{comp dorno} {ifco-c ,dorn_yes}
{setv chg_msg,%_hom%%_fon has been updated - mailrun.^m^j ^(bbsid,%bbsid^) ^(bbs,%bbs^) ^(mail,%mail^)}
{retu}
{:dorn_yes} {setv line,%line ^(dorno,%dorno^)} {retu}
{:no_fonchg}
{writ %line}
{setv chg_msg,%_hom%%_fon Unchanged.}
{goto add_fon}
{:changed}
{wclo}
{setv fon,%_fon}
{exec-s copy %_hom%commofon.new %_hom%%fon>NUL}
{exec-n del %_hom%commofon.new>NUL}
{clea}
{disp 2,2,,%chg_msg^j^j^m}
{call clea}
{setv fon}
{setv hold}
{goto do_ap} ;return control to CS-COMMO.CSM
{:esc} {clea}
{call clea}
{setv fon}
{setv hold}
{goto do_ap}
{:clea} {setv line}
{setv p1}
{setv p2}
{setv p3}
{setv p4}
{setv ok}
{setv abbr}
{setv cntr}
{setv coun}
{setv var}
{setv chg_msg}
{setv keyb}
{setv mail}
{setv bbs}
{setv dorno}
{setv bbsid}
{setv cs_col}
{setv bbs_col}
{setv mwa_col}
{setv ope_col}
{setv cfm_col}
{setv up_cmd}
{setv dn_cmd}
{setv char}
{setv pname}
{setv p_name}
{setv pline}
{setv sdesc}
{retu}
┌──────────────────────────────────────────────────────────────┐
│ Menu driven addition of external protocols to CS-COMMO.CSM │
└──────────────────────────────────────────────────────────────┘
{:pcol_2} {setv col,26} {setv row,1} {retu}
{:pcol_3} {setv col,52} {setv row,1} {retu}
{:prot_ref}
{setv p_up} {setv p_dn} {setv pname}
{ifex %_hom%PROTOCOL.DAT,,retu}
{rope %_hom%PROTOCOL.DAT,no_pref}
{setv count,1} {setv col,3} {setv row,1}
{:pref_loop}
{read pline}
{inst pline,l:}
{ifco-c p_hit}
{goto pref_loop}
{:p_hit}{subs pline,11,15,%pline}
{disp %row,%col,,%count. %pline}
{incr count} {incr row}
{comp count,21} {ifco-c pcol_2}
{comp count,41} {ifco-c pcol_3} {retu}
{:no_pref}{rclo}{incr count}
{disp 22,3,0e,Install which external protocol ? > ^h^h}
{gets-i p_num,2,retu}
{rope %_hom%\PROTOCOL.DAT,no_pref}
{setv count,1}
{setv ctr,1}
{:pdo_loop}
{read pline}
{inst pline,l:}
{ifco ,pdo_loop}
{comp ctr,%p_num}
{ifco pdo_this}
{incr ctr} {goto pdo_loop}
{:pdo_this}
{subs p_name,12,12,%pline}
{read p_up} {subs p_up,12,240,%p_up}
{read p_dn} {subs p_dn,12,240,%p_dn}
{rclo} {setv p_num} {setv ctr} {retu}
{:pikt_1} {disp 9,1,70, Adding %p_name }
{disp 9,40,70, Press <ENTER> to take default. } {retu}
{:pname}{setv pname,%p_name} {retu}
{:dp_up}{disp 17,3,0e,%%protodir\%p_up} {disp 19,1,0f,> } {retu}
{:up_cmd}{setv up_cmd,%p_up} {setv p_up} {disp 19,1,, } {retu}
{:dp_dn}{disp 21,3,0e,%%protodir\%p_dn} {disp 23,1,0f,> } {retu}
{:dn_cmd}{setv dn_cmd,%p_dn} {setv p_dn} {disp 23,1,, } {retu}
{:avail_lett}
{setv avail}
{setv all,ABCDEFGHIJKLMOPQRSTUVWXYZ!}
{setv count,0}
{:avail_loop}
{incr count}
{subs char,%count,1,%all}
{comp char,!} {ifco retu}
{comp eprot_%char}
{ifco ,avail_loop}
{setv avail,%avail %char} {goto avail_loop}
{:add_eprot}
{clea}
{call prot_ref}
{clea}
{disp 9,1,70, Add External file transfer protocol to CS-COMMO }
{comp p_name} {ifco-c ,pikt_1}
{setv var,eprot_?}
{call disp_help}
{call avail_let}
{:pik_letter}
{disp 11,3,,Available letters: %avail} {setv all}
{disp 13,3,0e,You MUST choose a letter for [%p_name] external protocol: ^h}
{gets-i _prot,1,esc} {comp _prot, } {ifco pik_letter}
{inst avail,%_prot} {ifco ,pik_letter} {setv avail}
{disp 14,3,0e,Input protocol name for menu display. <CR> = %p_name: }
{gets-i pname,12}
{comp pname} {ifco-c pname}
{wope-a %_hom%cs-mac%ver.cfg}
{writ eprot_%_prot,%pname ;Added %_dat %_tim}
{wclo}
{setv temp,eprot_%_prot}
{setv %%temp,%pname} {setv temp}
{setv var,:eup_?}
{call disp_help}
{disp 16,3,0e,Input complete %pname UPLOAD command line. <CR> for default.}
{disp 17,3,0e,progname.exe -send @^^}
{disp 17,33,0e,(send^^}
{disp 17,39,0e,).lst ^m^j> }
{comp p_up} {ifco-c ,dp_up}
{gets-i up_cmd}
{comp up_cmd} {ifco-c up_cmd}
{setv var,:edn_?}
{call disp_help}
{disp 20,3,0e,Input complete %pname DOWNLOAD command line. <CR> for default.}
{disp 21,3,0e,progname.exe -receive %%dl_dir ^m^j> }
{comp p_dn} {ifco-c ,dp_dn}
{gets-i dn_cmd}
{comp dn_cmd} {ifco-c dn_cmd}
{wope-a %_hom%%_mac}
{writ}
{writ ^(:eup_%_prot^) ^(setv cmd,%%protodir\%up_cmd^) ^(retu^)}
{writ ^(:edn_%_prot^) ^(setv cmd,%%protodir\%dn_cmd^) ^(retu^)}
{wclo}
{exec-s ver>NUL}
{clea}
{disp 2,5,0f,%pname Protocol [%_prot%] is installed.}
{disp 3,5,0e,%_hom%%_mac and CS-MAC%ver.CFG have been modified.}
{disp 4,5,0b,PgUp and PgDn menus now show %pname.^m^j^j}
{goto clea}
┌─────────────────┐
│ Parse Routine │
└─────────────────┘
* This routine parses a %cmd_str% variable into "space delimited"
* arguments. %arg0 is the routine to be called after :parse.
* Subsequent arguments %arg1, %arg2, %arg3, etc.
{:parse}
{inst %cmd_str%, }
{ifco ,eparse}
{setv pos,%_pos}
{decr pos}
{subs arg%pcount,1,%pos,%cmd_str}
{incr pos,2}
{subs cmd_str,%pos,255,%cmd_str}
{incr pcount}
{goto parse}
{:eparse}
{setv arg%pcount,%cmd_str}
{setv cmd_str}
{setv pcount,0}
{goto %arg0}
┌────────────────────────────────────────┐
│ Routine to strip comments from .CSMs │
└────────────────────────────────────────┘
* This routine opens a .CSM file that you specify, reads it
* line by line, deletes lines that have an asterisk within the first
* three characters, and removes comments following a semi-colon.
* The new file has a file extension of .CFS
*
* The purpose of this routine is to minimize RAM usage by
* shortening MAC files.
* Since Fred has added macro compiling to Commo, this feature is
* of dubious value.
{:strip}
{sete-p0 retu}
{setv file,%_hom%}
{:re_in}{inpu file,name of .CSM file to strip}
{inst %file,.} {ifco ,nodot} {setv pos,%_pos} {decr pos}
{subs file,1,%pos,%file} {setv pos}
{:nodot}{ifex %file%.csm,,re_in} ;make sure file exists
{clea}
{disp 3,1,,Stripping %file%.CSM into %file%.CFS^m^j}
{disp ,,,Line: }
{rope %file%.csm,e_strip} ;open .CSM to read
{wope %file%.cfs} ;open .CFS to write
{setv count,0}
{:s_loop}
{comp shh,y} {ifco qs_loop}
{incr count}
{disp ,7,,%count}
{:qs_loop}
{read line}
{comp line} {ifco no_com} ;write empty lines
{subs temp,1,3,%line} ;look at first three chars
{inst temp,*} {ifco s_loop} ; if a * skip the line
{subs temp,1,11,%line} ;look at first 11 chars
{inst temp,^(}{ifco ,no_com} ;look for a left curley
{subs line,%_pos,255,%line} ;delete leading whitespace
{inst line,;} {ifco ,no_com} ;look for a semicolon
{setv pos,%_pos} {decr pos} ;get semicolon position
{subs temp,%pos,255,%line} ;what follows semicolon?
{inst temp,^)} {ifco no_com} ; if a right curly, write!
{inst temp,)} {ifco no_com} ; if a right paren, write!
{subs line,1,%pos,%line} ;otherwise, delete comment
{:no_com}
{writ %line} ;xxx.CSM --> xxx.CFS file
{goto s_loop} ;read next line
{:e_strip}
{setv count}
{wclo} ;close .CFS file
{disp 6,1,,%file.csm has been stripped into %file.cfs^m^j}
{exec-w10 dir %file.*}
{retu} ;reload base.MAC
┌───────────────────────────────────────────────────┐
│ Check macros for labels duplicate to Home macro │
└───────────────────────────────────────────────────┘
{:fgrep_ut}
{ifex %utildir\fgrep.com,,no_fgrep}
{setv text}
{info-q1s0 Do you want to save to a txt file?}
{ifco-c text_y}
{setv _menu1, 1 ■ Search all *.SRC, *.CSM, & *.MAC files}
{setv _menu2, 2 ■ Search all *.FON and *.ADR}
{setv _menu3, 3 ■ Check one file for labels already in %_mac}
{setv _menu4, 4 ■ Make DOS CALL List (%ramdr\dos_call.lst)}
{setv _menu5, 5 ■ Search %address}
{setv _menter,label_srch}
{setv _mlabel,label_srch,fon_srch,dupe_chek,dos_lst,adr_srch}
{menu 9,60,fgrep menu}
{setv what} {setv where} {setv wher}
{retu}
{:label_srch}
{setv where,%_hom%*.csm %_hom%*.mac %_hom%*.src} {setv wher,MACs}
{call fgrep} {goto label_srch}
{:fon_srch}
{setv where,%_hom%*.fon %_hom%*.adr} {setv wher,MACs}
{goto fgrep}
{:dos_lst}{exec-n fgrep -flo70x "^(exec" %_hom%*.csm > %ramdr\dos_t}
{exec-n fgrep -flo70x "^(setv cmd," %_hom%*.csm >> %ramdr\dos_t}
{exec-n fgrep -svx " echo " %ramdr\dos_t > %ramdr\dos_call}
{exec-n fgrep -svx " type " %ramdr\dos_call > %ramdr\dos_t}
{exec-n fgrep -svx " copy " %ramdr\dos_t > %ramdr\dos_call}
{exec-n fgrep -svx " ren " %ramdr\dos_call > %ramdr\dos_t}
{exec-n fgrep -svx " del " %ramdr\dos_t > %ramdr\dos_call}
{exec-n fgrep -svx " dir " %ramdr\dos_call > %ramdr\dos_t}
{exec-n fgrep -svx " cd " %ramdr\dos_t > %ramdr\dos_call.lst}
{exec-n del %ramdr\dos_t>NUL}
{exec-n del %ramdr\dos_call>NUL}
{setv file,%ramdr\dos_call.lst}
{call ed_it}
{}
{:adr_srch}
{setv where,%address} {setv wher,%where}
{goto fgrep}
{:fgrep}{setv what}
{inpu what,What do you want to search %wher for?}
{setv wher} {comp what} {ifco stop}
{comp text} {ifco-c screen,text}
{retu}
{:screen} {exec-nw fgrep -flo70x "%what" %where}
{setv where} {retu}
{:text} {exec-n fgrep -flo70x "%what" %where > %text}
{setv where} {edit %text} {info-q1s0 Delete %text?}
{setv text} {ifco ,retu} {exec-n del %text} {retu}
{:text_y}
{setv text,%savedir\}
{inpu text,Save fgrep search to ....}
{comp text,%savedir\} {ifco ,retu}
{setv text} {retu}
{:du_shh1} {disp %dupe_cnt,1,,Reading %file Line: %count } {retu}
{:du_shh2} {disp ,,, Label: %dupe } {retu}
{:du_shh3} {disp %dupe_cnt,1,,^mReading %file Line: %count DUPLICATE %dupe} {retu}
{:dupe_chek}
{setv file,%_hom}
{sete-p0 dupe_edit}
{inpu file,Search macro for labels duped in %_hom%%_mac}
{sete-p0 dupe_loop}
{comp file,%_hom} {ifco dupe_edit}
{comp file} {ifco dupe_edit}
{ifex %file,,dupe_chek}
{clea}
{disp %dupe_cnt,1,,Duplicate checking %file .. be patient}
{exec-n fgrep -sx "^(:" %_hom%%_mac > %_hom%dupechek}
{rope %file,end_dupe}
{setv count,0}
{setv dupe_cnt,1}
{:dupe_loop}
{read line}
{incr count}
{inst line,^(:}
{ifco ,dupe_loop}
{comp shh} {ifco-c du_shh1}
{subs line,%_pos,255,%line}
{inst line,^)}
{subs dupe,1,%_pos,%line}
{comp shh} {ifco-c du_shh2}
{exec-d %utildir\fgrep.com -e "%dupe%" %_hom%dupechek}
{ifer 1,,dupe_loop}
{comp shh} {ifco-c du_shh3}
{wope-a %_hom%dupes}
{writ %_dat %_24h%:%_min% %file Line: %count Dupe: %dupe}
{wclo}
{incr dupe_cnt}
{goto dupe_loop}
{:end_dupe}
{decr dupe_cnt}
{wope-a %_hom%dupes}
{writ END label test %file %dupe_cnt Duplicates}
{writ} {wclo}
{disp ,,,^mDone : %file %count Lines %dupe_cnt Duplicates with %_hom%%_mac ^m}
{goto dupe_chek}
{:dupe_edit}
{edit %_hom%dupes}
{setv dupe}
{setv dupe_cnt}
{retu}
{:no_fgrep}
{info This routine requires %utildir\fgrep.com to operate}
{retu}
┌──────────────────────────────────┐
│ Menu driven .CFG file Routines │
└──────────────────────────────────┘
* These macro routines are designed for easy expansion and upgrading.
* After a user has run CS-MAC once, future upgrades will build on the
* initial configuration file.
* This macro copes when a user skips versions .... the resulting
* .CFG file will have all (and only) new variable definitions appended.
* The CS-MAC user won't need to review existing configuration data.
* This is done by reading the COMMO variable space and the old config
* file. If a variable appears in either, the user will not be asked
* to confirm its value.
* When a variable appears on the list below but is in neither the
* current config file nor in Commo variable space, the user is
* prompted to assign a value to the variable. Extended prompts
* and Example (=default) settings are taken from CS-MAC.HLP.
{:bail_new}
{clea}
{info-qs0 Bail-out will delete CS-MAC%ver.CFG. Are you sure you want this?}
{ifco ,ug_loo}
{exec-n del %_hom%cs-mac%ver.cfg>NUL}
{:exit_new}
{info-d15s0 CS-MAC%ver exiting ^(Commo^) and returning to DOS}
{exit}
{:need_hl} {info-q CS-MAC.HLP not found in %_hom. Continue without help?}
{ifco retu,exit_new}
{:bail_out}
{clea}
{info-qs0 Bail-out will Exit Commo. Are you sure you want this?}
{ifco ,ug_loo}
{exec-n echo CS-MAC%ver ABORTED UPGRADE >> %_hom%cs-mac%ver.cfg}
{exec-n echo %_dat %_tim >> %_hom%cs-mac%ver.cfg}
{exec-n ren %_hom%cs-mac%ver.cfg cs-mac%ver_ck.cfg}
{goto exit_new}
{:welcome}
{stat y}
{clea}
{disp 4,11,, Welcome to the CS-MAC series!}
{disp 5,11,,A configuration file (CS-MAC%ver.CFG) will be written for you ... }
{info-qs0 Continue with Installation of CS-MAC%ver?}
{ifco retu} {clea} {info-d10s0 CS-MAC%ver installation terminated}
{goto exit_new}
{:new_user}
{sete-p0 bail_new}
{setv vctr,1}
{ifex-c %_hom%cs-mac.hlp,,need_hl}
{call welcome}
{wope-a %_set}
{writ}
{writ ^(mac=start^) Startup macro label for CS-MAC%ver}
{writ Added %_dat at %_tim}
{wclo}
{wope %_hom%cs-mac%ver.cfg} ;make this version cs-mac.cfg
{writ CS-MAC%ver.CFG} ;Header for this .CFG file
{writ %_dat% %_tim%}
{writ}
{wclo}
{goto ug_loo}
{:upgrade}
{sete-p0 bail_out}
{setv vctr,1}
{setv ver_ck,%ver} ;set var to check .cfg version
{ifex-c %_hom%cs-mac.hlp,,need_hl}
{:ver_loop}
{decr ver_ck} ;start looking for older .cfg
{leng %ver_ck}
{comp %_len,1} {ifco ,no_pad} ;pad single digit version name
{setv ver_ck,0%ver_ck} ; with a leading zero
{:no_pad}
{ifex %_hom%cs-mac%ver_ck.cfg,rencfg} ;find old .cfg file
{comp ver_ck,06} {ifco ,ver_loop}
{:rencfg}{exec-n ren %_hom%cs-mac%ver_ck.cfg cs-mac%ver.cfg}
{wope-a %_hom%cs-mac%ver.cfg}
{writ}
{writ CS-MAC%ver update}
{writ %_dat %_tim} {writ} {wclo}
{:ug_loo}{disp 9,1,70, Input a value for CS-MAC%ver.CFG file ■ Empty CR accepts example }
{setv count,10} {call 1-2cle}
{call ug_loop}
{:ready}
{sete-p0 commo}
{wclo}
{clea}
{disp 2,3,,%_hom%CS-MAC%ver%.CFG is up to date.}
{disp 3,3,,It will be read into your COMMO startup.}
{setl}
{:commo}{setv var} {setv valu}
{setv pos} {setv prompt}
{setv pad} {setv pad_l}
{setv sdesc} {setv hline}
{setv sugg} {setv ver_ck}
{setv vctr}
{wclo}
{disp 4,3,, }
{disp 9,1,, }
{disp 5,1}
{goto start} ;in CS-COMMO.CSM
{:disp_help} ;routine to display segments
{ifex %_hom%cs-mac.hlp,,retu} ; from a variable description
{call no_hl} ; file (CS-MAC.HLP)
{rope %_hom%cs-mac.hlp,retu}
{comp shh,y} {ifco n_hlp}
{disp 1,7,,Checking HELP for %var}
{:n_hlp}{disp 1,2,, ...}
{read hline}
{inst hline,Variable: %var }
{ifco ,n_hlp}
{setv count,1}
{subs sdesc,33,36,%hline} ;%sdesc is imported to .CFG
{subs hline,12,72,%hline}
{:d_hlp}{disp %count,1,,%hline}
{read hline} {comp hline} {ifco rclo}
{inst hline,Example : } {ifco-c get_ex}
{incr count} {comp count,8}
{ifco-l d_hlp} {rclo} {retu}
{:no_hl}{setv count,1}
{:cl_hl}{disp %count,1,, }
{incr count} {comp count,8}
{ifco-l cl_hl}
{:rclo} {rclo} {retu} ;end of disp_help
{:get_ex} {subs sugg,12,40,%hline} ;subroutine to take suggested
{inst sugg, } {ifco-c strp_cmnt}
{inst sugg,%%} ;is this a variable expression
{ifco ,retu} ;ifnot, we're done
{subs sugg,2,40,%sugg} ;strip % off
{inst sugg,%%} ;find second %
{setv len,%_pos} {incr len}
{subs tail,%len,40,%sugg} {decr len,2} ;save tail
{subs sugg,1,%len,%sugg} ;variable name
{setv-s sugg,%sugg} ;convert to variable contents
{subs rear,-1,1,%sugg} ;make %_hom wo/backslash
{comp rear,\} {ifco-c strp_bksl}
{setv sugg,%sugg%%tail} ;restore tail
{retu} ;end of extract suggestion
{:strp_cmnt} {subs sugg,1,%_pos,%sugg} {retu}
{:strp_bksl}
{leng %sugg}
{setv len,%_len} {decr len}
{subs sugg,1,%len,%sugg} {retu}
{:put_it}
{rclo}
{comp %%var} {ifco ,retu} ;skip config if item in COMMOspace
{disp 11,36,, }
{disp 12,35,, }
{disp 13,35,, }
{disp 13,2,, ... }
{comp shh,y} {ifco cfg_hshh}
{disp 13,7,,Checking CFG for %var }
{:cfg_hshh}
{rope %_hom%cs-mac%ver.cfg,no_cfg}
{:cfg_chk}
{read line}
{inst line,%var,} {ifco ,cfg_chk} ;skip if item in .CFG file
{rclo} {retu}
{:no_cfg}
{disp 9,2,70,%vctr}
{call disp_help} ;display help
{comp var,shh} {ifco skip_skip} ;always show %shh
{comp new} {ifco skip_skip} ;always show unless new user
{inst sugg,NUL} {ifco skip_nul}
{:skip_skip}
{disp 11,26,,Variable: %var}
{disp 12,27,,Example: %sugg}
{disp 13,2,,Value for your startup .CFG file: }
{gets-i valu}
{comp valu,NUL} {ifco-c valu_nul}
{comp valu} {ifco-c def_valu}
{:nul_skip}
{incr vctr}
{setv pad, }
{setv pad_l,42}
{leng %var%%valu} {decr pad_l,%_len} {subs pad,1,%pad_l,%pad}
{wope-a %_hom%cs-mac%ver.cfg}
{writ %var,%valu %pad ;%sdesc}
{wclo}
{setv %%var,%valu}
{retu}
{:skip_nul} {setv valu} {goto nul_skip}
{:valu_nul} {setv valu} {retu}
{:def_valu} ;subroutine to put default
{inst sugg,NUL} {ifco retu} ;if suggested value is NUL
{setv valu,%sugg} {retu} ;else, replace w/suggestion
{:ug_loop}
08 {setv var,shh} {call put_it} ;if "Y", quiets SFI
07 {setv var,name} {call put_it} ;your logon name
07 {setv var,handle} {call put_it} ;handle for Internet use
07 {setv var,v_ph} {call put_it} ;your Voice Phone Number
07 {setv var,d_ph} {call put_it} ;your Data Phone Number
07 {setv var,b_day} {call put_it} ;your Birthdate
07 {setv var,sig} {call put_it} ;your signature
07 {setv var,utildir} {call put_it} ;dir for utility programs
13 {setv var,protodir} {call put_it} ;dir for external protocols
07 {setv var,savedir} {call put_it} ;dir for capture files
07 {setv var,ins_dir} {call put_it} ;dir for docs & instructions
07 {setv var,qwkdr} {call put_it} ;dir for .QWK files
07 {setv var,znpak} {call put_it} ;dir for ZIPNEWS packets
07 {setv var,repdr} {call put_it} ;dir for .REP files
07 {setv var,znrdr} {call put_it} ;dir for ZIPNEWS reader
11 {setv var,hold_dr} {call put_it} ;temp hold dir for downloads
11 {setv var,picdr} {call put_it} ;dir to strew .GIF, etc
07 {setv var,ramdr} {call put_it} ;your RAMDrive
07 {setv var,bu_dr} {call put_it} ;Backup drive for .MACs
07 {setv var,dosdir} {call put_it} ;dir for DOS files
07 {setv var,lst_dir} {call put_it} ;dir for BBS file list storage
07 {setv var,ext_ed} {call put_it} ;drive:\path\external_editor
07 {setv var,ext_li} {call put_it} ;drive:\path\external_lister
07 {setv var,pk_zip} {call put_it} ;drive:\path\ZIP_program
07 {setv var,pk_un} {call put_it} ;drive:\path\UNZIP_program
08 {setv var,ext_fl} {call put_it} ;drive:\path\file_lister
10 {setv var,address} {call put_it} ;drive:\path\Address_book
07 {setv var,reader} {call put_it} ;drive:\path\mail_reader
08 {setv var,ext_di} {call put_it} ;drive:\path\voice_call_dialer
07 {setv var,prot} {call put_it} ;file trans protocol
07 {setv var,mprot} {call put_it} ;mail trans protocol
13 {setv var,eprot_h} {call put_it} ;HS/Link external protocol
13 {setv var,eprot_k} {call put_it} ;Kermit external protocol
13 {setv var,eprot_s} {call put_it} ;Smodem external protocol
13 {setv var,swap_prot}{call put_it} ;Swap out for external protocols?
11 {setv var,min_msg} {call put_it} ;Minimum size of mail packet
11 {setv var,zmin_msg} {call put_it} ;Minimum size of ZIPNews packet
07 {setv var,qrdr} {call put_it} ;.QWK ren routine (qwk or jbr)
07 {setv var,znr} {call put_it} ;.ZNS packet rename routine
11 {setv var,max_pak} {call put_it} ;Number of packets per %BBSID
11 {setv var,sho_} {call put_it} ;N = skip show file actions
08 {setv var,color} {call put_it} ;Answer to ANSI graphics? prompt
08 {setv var,fast} {call put_it} ;"quick non-stop" modifiers
11 {setv var,chat_str} {call put_it} ;Uh-oh, SYSOP interruption
11 {setv var,pr_alarm} {call put_it} ;alarm ring count 0 = quiet
12 {setv var,inet_pmt} {call put_it} ;internet provider prompt
12 {setv var,tn_pf} {call put_it} ;telnet prefix for "dialing"
12 {setv var,inet_bye} {call put_it} ;logoff command inet provider
13 {setv var,uqwk_type}{call put_it} ;QWK, SOUP, or ZIPNEWS packets?
13 {setv var,uqwk_news}{call put_it} ;"Y" to take news, else mail only
07 {setv var,tagfile} {call put_it} ;filename for your taglines
08 {setv var,random_t} {call put_it} ;# of lines in tagfile ... max 3600
12 {setv var,tag_pf} {call put_it} ;prefix when sending tagline
13 {setv var,_slp} {call put_it} ;row# for status line
07 {setv var,cap} {call put_it} ;capture filename
10 {setv var,palette} {call put_it} ;Menu colors
10 {setv var,xtime} {call put_it} ;# of seconds to EXIT
13 {setv var,cs_hlp} {call put_it} ;ask for use of CS-MAC help
13 {setv var,_edd} {call put_it} ;"Y" to open FON on Commo load
13 {setv var,_prn} {call put_it} ;Printer device name [PRN, LPT2]
13 {setv var,max_desc} {call put_it} ;max # of lines - file descrip
13 {setv var,swap_ed} {call put_it} ;"Y" to swap Commo before edit
13 {setv var,exed_all} {call put_it} ;"Y" to use ext_ed for all files
13A {setv var,ed_wfl} {call put_it} ;"Y" to use PNS to pick edit files
10 {setv var,l_parm} {call put_it} ;NULmodem transfer parms
10 {setv var,l_use} {call put_it} ;NULmodem transfer log
07 {setv var,xpert} {call put_it} ;"y" for complex menus
10 {setv var,dev_mac} {call put_it} ;developmental macro
10 {setv var,dev_st} {call put_it} ;develop'l macro start lbl
13 {setv var,fb_mac} {call put_it} ;original COMMO.MAC renamed
07 {setv var,auto} {call put_it} ;"y" for Autopilot ON
11 {setv var,ev_file} {call put_it} ;event timing and labels
11 {setv var,ap_clr} {call put_it} ;Autopilot Hotkey menu color
11 {setv var,ap_tlr} {call put_it} ;Autopilot Toggle menu color
11 {setv var,ap_menu} {call put_it} ;"Y" to enable custom menu
11 {setv var,ap_pass} {call put_it} ;Autopilot host password file
11 {setv var,ap_ans} {call put_it} ;Modem ANSWER string for Host
11 {setv var,door_way} {call put_it} ;path\doorway.exe /parm: options
13 {setv var,ext_host} {call put_it} ;hook to external host
11 {setv var,cs_id} {call put_it} ;Default name for key file
13 {setv var,jb_learn} {call put_it} ;use JB-LEARN engine
{retu}